const moduleB = {
  namespaced: true,
  state: {
    countB: 1
  },
  getters: {
    countBB: (state) => {
      return state.countB + 10
    }
  },
  mutations: {
    increaseB(state) {
      state.countB++
    },
  },
  actions: {
    asyncIncreaseB({ commit }) {
      commit('increaseB')
    },
    asyncGloBalMut({ commit }, playload) {
      // 触发全局的muation - incrementMut
      commit('incrementMut', playload, { root: true })
    },
    asyncGloBalAct({ dispatch }, playload) {
      // 触发全局的action - incrementAct
      dispatch('incrementAct', playload, { root: true })
    }
  }
}

export default moduleB